home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / Caml Light 0.7 source / src / tools / fakelink < prev    next >
Text File  |  1995-07-03  |  709b  |  35 lines

  1. # FakeLink -- "build" an empty file to give to "fatmerge" to make a lean binary.
  2.  
  3. # This script tries to ignore all but the relevant options, so that it can
  4. # replace a linker without changing the makefiles.
  5. # This can fail if the name of a file given to the linker is "-o", "-c",
  6. # or "-t".
  7.  
  8. set echo 0
  9.  
  10. set output link.out
  11. set creator '????'
  12. set type 'APPL'
  13.  
  14. loop
  15.   break if {#} == 0
  16.   if "{1}" == "-o"
  17.     set output "{2}"
  18.     shift
  19.   else if "{1}" == "-c"
  20.     set creator "{2}"
  21.     shift
  22.   else if "{1}" == "-t"
  23.     set type "{2}"
  24.     shift
  25.   end
  26.   shift
  27. end
  28.  
  29. delete -i "{output}"
  30. if "{creator}" == "????"
  31.   rez -t "{type}" -o "{output}" <dev:null
  32. else
  33.   rez -c "{creator}" -t "{type}" -o "{output}" <dev:null
  34. end
  35.